Skip to content

Fix Codex security review authorization - #6913

Draft
jmecom wants to merge 1 commit into
mainfrom
jm/fix-security-review-invalidation-permissions
Draft

Fix Codex security review authorization#6913
jmecom wants to merge 1 commit into
mainfrom
jm/fix-security-review-invalidation-permissions

Conversation

@jmecom

@jmecom jmecom commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

The Codex security review workflow now authorizes automatic reviews from the live pull request instead of the webhook snapshot. This prevents a stale author association from sending an internal PR down the external-contributor invalidation path.

Internal PRs with no previous review now exit without attempting a comment or label mutation. The jobs that update PR comments and labels use pull-requests: write, and the review job runs only after the trusted prepare step emits authorized=true.

Regression tests cover stale author associations in both directions, the no-op invalidation path, and the mutation-job permission contract.

Checked with just ci, just security-review-check, and actionlint .github/workflows/codex-security-review.yml.

The failing Mark Previous Review Stale check on this PR runs the pre-fix pull_request_target workflow from main. GitHub will not execute this branch’s trusted workflow until it is merged; the new workflow contract and state-machine tests exercise the fix before then.

Signed-off-by: Jordan Mecom <jm@squareup.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant